package com.example.commons.future;

import com.example.commons.model.BizResMsg;

import java.util.concurrent.Future;

/**
 * 异步消息回调接口类
 */
public interface MsgFuture<RES> extends Future<BizResMsg<RES>> {

    Throwable cause();

    void setCause(Throwable cause);

    boolean isWriteSuccess();

    void setWriteResult(boolean result);

    String setReqId();

    BizResMsg<RES> response();

    void setRes(BizResMsg<RES> response);

    boolean isTimeout();

    long getBegin();
}
